#include <stdio.h>

//输入多组数据，去掉最高分，去掉最低分，加和求平均值
int main() {
    int i = 0;
    int score = 0;
    int max = 0;
    int min = 100;
    int sum = 0;
    while (scanf("%d",&score))
    {
        i++;
        if (score > max)
        {
            max = score;
        }
        if (score < min)
        {
            min = score;
        }
        sum += score;
        if(i == 7)
        {
            printf("%.2f\n", (sum-max-min)/5.0);
            i = 0;
            max = 0;
            min = 100;
            sum = 0;
        }
    }
    return 0;
}